import request from '@/router/axios';
import {
  fenExYuangettoFixed, getAppealTypes, getIs_sup_payment,
  getLineName, getMappingStatus,
  getNoticeStates,
  getStationName, is_sup_payment,getSCOrLCOrACC,
  allStatus, getMappingStatusArray,data_source_status,getData_source_status,
} from "../../../subwayRat/commonCheck";

export function getTvmTicketCYXCNewList(query) {
  return request({
    url: '/check/cz_xw/getTvmTicketCYXCNewList',
    method: 'post',
    params: query,
    data:query,
  })
}
/**
 * tvm列表
 * @param query
 */
export function get_cz_xw_SwAuTvmMoneyAssistList(query) {
  return request({
    url: '/check/cz_xw/get_cz_xw_SwAuTvmMoneyAssistList',
    method: 'post',
    params: query,
    data:query,
  })
}


export function get_tvm_ZN_Option() {
  return {
    emptyBtn: false,
    viewBtn: false,
    editBtn: false,
    delBtn: false,
    addBtn: false,
    border: true,
    index: true,
    indexLabel: '序号',
    page: true,
    align: 'center',
    menuWidth: 150,
    menuAlign: 'center',
    selection: true,
    reserveSelection: false,
    height: 450,
    column: [
      {label: "收入日期", prop: "recordTime",type:'date',format:'yyyy-MM-dd',valueFormat:'yyyy-MM-dd',search:true},
      {label: "TVM编号", prop: "tvmCode",type:'select',search:true,searchslot:true,},
      {label: "卸载状态", prop: "boxUninstallStatus",type:'select',search:true,dicData:getMappingStatusArray('BOX_UNINSTALL_STATUS'),formatter:function (row,v) {
        return getMappingStatus('BOX_UNINSTALL_STATUS',v);
      }},
      {label: "系统金额", prop: "systemMoney",formatter:function (row,v) {
        return fenExYuangettoFixed(row,'systemMoney');
      }},
      {label: "实点金额", prop: "actualMoney",formatter:function (row,v) {
        return fenExYuangettoFixed(row,'actualMoney');
      }},
      {label: "差异金额", prop: "diffMoney",formatter:function (row,v) {
        return fenExYuangettoFixed(row,'diffMoney');
      }},
      {label: "手工清出金额", prop: "handOutMoney",width:95,formatter:function (row,v) {
        return fenExYuangettoFixed(row,'handOutMoney');
      }},
      {
        label: '系统数据来源',
        prop: 'dataSource',
        formatter :function(row, value , label, column){
          return getSCOrLCOrACC(value);
        },
        type:'select',
        dicData: [{
          label: '修正',
          value: 1
        },{
          label: 'SC',
          value: 2
        },{
          label: 'LC',
          value: 3
        },{
          label: 'ACC',
          value: 4
        },{
          label: '单台设备差异协查结果',
          value: 5
        },{
          label: '分钱箱审核结果',
          value: 6
        },{
          label: '修正',
          value: '7'
        }],
        width:95
      }, 
      {
        label: "数据来源",
        prop: "sysDataSource", 
        type: 'select',
        dicData: data_source_status(),
        formatter: function (row, v) {
          return getData_source_status(v);
        }
      },            
      {label: "SC系统售票金额", prop: "scCashSellTicket",width:115,formatter:function (row,v) {
        return fenExYuangettoFixed(row,'scCashSellTicket');
      }},
      {label: "SC系统充值金额", prop: "scCashRecharge",width:115,formatter:function (row,v) {
        return fenExYuangettoFixed(row,'scCashRecharge');
      }},
      {label: "SC系统退款金额", prop: "scCashReturn",width:115,formatter:function (row,v) {
        return fenExYuangettoFixed(row,'scCashReturn');
      }},
      // {label: "LC系统售票金额", prop: "lcCashSellTicket",width:115,formatter:function (row,v) {
      //   return fenExYuangettoFixed(row,'lcCashSellTicket');
      // }},
      // {label: "LC系统充值金额", prop: "lcCashRecharge",width:115,formatter:function (row,v) {
      //   return fenExYuangettoFixed(row,'lcCashRecharge');
      // }},
      // {label: "LC系统退款金额", prop: "lcCashReturn",width:115,formatter:function (row,v) {
      //   return fenExYuangettoFixed(row,'lcCashReturn');
      // }},
      // {label: "ACC系统售票金额", prop: "accCashSellTicket",width:120,formatter:function (row,v) {
      //   return fenExYuangettoFixed(row,'accCashSellTicket');
      // }},
      // {label: "ACC系统充值金额", prop: "accCashRecharge",width:120,formatter:function (row,v) {
      //   return fenExYuangettoFixed(row,'accCashRecharge');
      // }},
      // {label: "ACC系统退款金额", prop: "accCashReturn",width:120,formatter:function (row,v) {
      //   return fenExYuangettoFixed(row,'accCashReturn');
      // }},
      {label: "通知时间", prop: "sendTime",format:'yyyy-MM-dd',valueFormat:'yyyy-MM-dd',width:90},
    ]
  }
}

export const tableOptionView =  {
    border: true,
    index: true,
    indexLabel: '序号',
    stripe: true,
    menuAlign: 'center',
    align: 'center',
    dialogWidth: '70%',
    searchLabelWidth: 100,
    submitBtn: false,
    editBtn: false,
    emptyBtn: false,
    menuBtn: false,
    column: [
      {label: "收入日期", prop: "recordTime",type:'date',format:'yyyy-MM-dd',valueFormat:'yyyy-MM-dd',search:true},
      {label: "TVM编号", prop: "tvmCode",type:'select',search:true,searchslot:true,},
      {label: "卸载状态", prop: "boxUninstallStatus",type:'select',search:true,dicData:getMappingStatusArray('BOX_UNINSTALL_STATUS'),formatter:function (row,v) {
        return getMappingStatus('BOX_UNINSTALL_STATUS',v);
      }},
      {label: "系统金额", prop: "systemMoney",formatter:function (row,v) {
        return fenExYuangettoFixed(row,'systemMoney');
      }},
      {label: "实点金额", prop: "actualMoney",formatter:function (row,v) {
        return fenExYuangettoFixed(row,'actualMoney');
      }},
      {label: "差异金额", prop: "diffMoney",formatter:function (row,v) {
        return fenExYuangettoFixed(row,'diffMoney');
      }},
      {label: "手工清出金额", prop: "handOutMoney",formatter:function (row,v) {
        return fenExYuangettoFixed(row,'handOutMoney');
      }},
      {
        label: '系统数据来源',
        prop: 'dataSource',
        formatter :function(row, value , label, column){
          return getSCOrLCOrACC(value);
        },
        type:'select',
        dicData: [{
          label: '修正',
          value: 1
        },{
          label: 'SC',
          value: 2
        },{
          label: 'LC',
          value: 3
        },{
          label: 'ACC',
          value: 4
        },{
          label: '单台设备差异协查结果',
          value: 5
        },{
          label: '分钱箱审核结果',
          value: 6
        },{
          label: '修正',
          value: '7'
        }]
      }, 
      {
        label: "数据来源",
        prop: "sysDataSource", 
        type: 'select',
        dicData: data_source_status(),
        formatter: function (row, v) {
          return getData_source_status(v);
        }
      },            
      {label: "SC系统售票金额", prop: "scCashSellTicket",},
      {label: "SC系统充值金额", prop: "scCashRecharge",},
      {label: "SC系统退款金额", prop: "scCashReturn",},
      // {label: "LC系统售票金额", prop: "lcCashSellTicket",},
      // {label: "LC系统充值金额", prop: "lcCashRecharge",},
      // {label: "LC系统退款金额", prop: "lcCashReturn",},
      // {label: "ACC系统售票金额", prop: "accCashSellTicket",},
      // {label: "ACC系统充值金额", prop: "accCashRecharge",},
      // {label: "ACC系统退款金额", prop: "accCashReturn",},
      {label: "通知时间", prop: "sendTime",format:'yyyy-MM-dd',valueFormat:'yyyy-MM-dd'},
    ]
}
